"""
索引下标,循环取出
下面两种方式，是有区别的，第二种循环num是nums的代言，如果给num赋值是不能改变nums的值
"""
nums = [1, 2, 3, 4, 5]
for i in range(len(nums)):
    print(i)
    nums[i] = 100
print(nums)

print("-." * 20)

for num in nums:
    print(num)
    num = 100
print(nums)

print('-.' * 20)

for i, x in enumerate(nums):
    print(i, x)
